package com.ruowei.modules.foodOrder.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;

import java.io.Serializable;
import java.time.Instant;

/**
 * 配送员修改日志表
 */
@ApiModel(description = "配送员修改日志表")
@Entity
@Table(name = "courier_change_log")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Deprecated
public class CourierChangeLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator")
    @SequenceGenerator(name = "sequenceGenerator")
    private Long id;

    /**
     * 配送员编码
     */
    @ApiModelProperty(value = "配送员编码")
    @Column(name = "courier_code")
    private String courierCode;

    /**
     * 配送员姓名
     */
    @ApiModelProperty(value = "配送员姓名")
    @Column(name = "name")
    private String name;

    /**
     * 配送员性别
     */
    @ApiModelProperty(value = "配送员性别")
    @Column(name = "sex")
    private String sex;

    /**
     * 配送员年龄
     */
    @ApiModelProperty(value = "配送员年龄")
    @Column(name = "age")
    private String age;

    /**
     * 配送员电话
     */
    @ApiModelProperty(value = "配送员电话")
    @Column(name = "phone")
    private String phone;

    /**
     * 配送员登录名
     */
    @ApiModelProperty(value = "配送员登录名")
    @Column(name = "login_code")
    private String loginCode;

    /**
     * 配送员密码
     */
    @ApiModelProperty(value = "配送员密码")
    @Column(name = "jhi_password")
    private String password;

    /**
     * 修改人
     */
    @ApiModelProperty(value = "修改人")
    @Column(name = "update_by")
    private String updateBy;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    @Column(name = "update_time")
    private Instant updateTime;

    // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCourierCode() {
        return courierCode;
    }

    public CourierChangeLog courierCode(String courierCode) {
        this.courierCode = courierCode;
        return this;
    }

    public void setCourierCode(String courierCode) {
        this.courierCode = courierCode;
    }

    public String getName() {
        return name;
    }

    public CourierChangeLog name(String name) {
        this.name = name;
        return this;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public CourierChangeLog sex(String sex) {
        this.sex = sex;
        return this;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getAge() {
        return age;
    }

    public CourierChangeLog age(String age) {
        this.age = age;
        return this;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public String getPhone() {
        return phone;
    }

    public CourierChangeLog phone(String phone) {
        this.phone = phone;
        return this;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPassword() {
        return password;
    }

    public CourierChangeLog password(String password) {
        this.password = password;
        return this;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setLoginCode(String loginCode) { this.loginCode = loginCode; }

    public String getLoginCode() { return loginCode; }

    public CourierChangeLog loginCode(String loginCode) {
        this.loginCode = loginCode;
        return this;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public CourierChangeLog updateBy(String updateBy) {
        this.updateBy = updateBy;
        return this;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public Instant getUpdateTime() {
        return updateTime;
    }

    public CourierChangeLog updateTime(Instant updateTime) {
        this.updateTime = updateTime;
        return this;
    }

    public void setUpdateTime(Instant updateTime) {
        this.updateTime = updateTime;
    }
    // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof CourierChangeLog)) {
            return false;
        }
        return id != null && id.equals(((CourierChangeLog) o).id);
    }

    @Override
    public int hashCode() {
        return 31;
    }

    @Override
    public String toString() {
        return "CourierChangeLog{" +
            "id=" + getId() +
            ", courierCode='" + getCourierCode() + "'" +
            ", name='" + getName() + "'" +
            ", sex='" + getSex() + "'" +
            ", age='" + getAge() + "'" +
            ", phone='" + getPhone() + "'" +
            ", password='" + getPassword() + "'" +
            ", updateBy='" + getUpdateBy() + "'" +
            ", updateTime='" + getUpdateTime() + "'" +
            "}";
    }
}
